<template>
	<view class="gategory-wrap">
		<view class="u-f-jsb">
			<view>热门分类</view>
			<view class="f_center" @tap="more">更多<view class="icon iconfont icon-jinru"></view></view>
		</view>
		<view class="u-f">
			<block v-for="item in nav" :key="item.id">
				<view class="gategory-item">
					{{item.name}}
				</view>
			</block>
		</view>
	</view>
</template>

<script>
	export default{
		props: {
			nav: Array
		},
		methods: {
			more(){
				this.$emit('more');
			}
		}
	}	
</script>

<style scoped>
	.gategory-wrap {
		padding: 20upx;
		font-size: 14px;
		border-bottom: 1upx solid #EEE;
	}
	.gategory-wrap>view:first-of-type>view:first-of-type {
		color: #000;
	}
	
	.gategory-wrap>view:first-of-type>view:last-of-type {
		color: #D6D6D6;
	}
	
	.gategory-wrap>view:last-of-type>.gategory-item {
		display: flex;
		flex: 1;
		background-color: #F7F7F7;
		align-items: center;
		justify-content: center;
		border-radius: 10upx;
		margin: 10upx;
		box-sizing: border-box;
		color: #9E9E9E;
	}
</style>
